<?php
/*
Template Name:GrayWind
Description:Designed by ThemeLayouts.
Author:夏天校尉
Author Url:http://hurryupup.com/
Sidebar Amount:1
ForEmlog:4.1.0
*/
if(!defined('EMLOG_ROOT')) {exit('error!');}
require_once (View::getView('module'));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="keywords" content="<?php echo $site_key; ?>" />
<meta name="description" content="<?php echo $description; ?>" />
<meta name="generator" content="hurryupup" />
<title><?php echo $blogtitle; ?></title>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="<?php echo BLOG_URL; ?>xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="<?php echo BLOG_URL; ?>wlwmanifest.xml" />
<link rel="alternate" type="application/rss+xml" title="RSS"  href="<?php echo BLOG_URL; ?>rss.php">
<link href="<?php echo TEMPLATE_URL; ?>main.css" rel="stylesheet" type="text/css" />

<link rel="shortcut icon" href="<?php echo BLOG_URL; ?>favicon.ico"  />
<link rel="Bookmark" href="<?php echo BLOG_URL; ?>favicon.ico"/>

<script src="<?php echo BLOG_URL; ?>include/lib/js/common_tpl.js" type="text/javascript"></script>
<?php doAction('index_head'); ?>
</head>
<body>
    <div class="main" align="center">
	<div class="header">
		<div id="headiv">
                    <li id="title"><h1 align="left"><a href="<?php echo BLOG_URL; ?>"><?php echo $blogname; ?></a></h1></li>
			<li id="tagline"><?php echo $bloginfo; ?></li>

		</div>
		<div id="menus">
			<li class="menus1"><a href="<?php echo BLOG_URL; ?>">首页</a></li>
			<?php if($istwitter == 'y'):?>
            <li class="menus2"><a href="<?php echo BLOG_URL; ?>t/"><?php echo Option::get('twnavi');?></a></li>
            <?php endif;?>
			<?php 
			foreach ($navibar as $key => $val):
			if ($val['hide'] == 'y'){continue;}
			if (empty($val['url'])){$val['url'] = Url::log($key);}
			?>
			<li class="menus2"><a href="<?php echo $val['url']; ?>" target="<?php echo $val['is_blank']; ?>"><?php echo $val['title']; ?></a></li>
			<?php endforeach;?>
			<?php doAction('navbar', '<li class="menus2">', '</li>'); ?>
			<?php if(ROLE == 'admin' || ROLE == 'writer'): ?>
			<li class="menus2"><a href="<?php echo BLOG_URL; ?>admin/write_log.php">写日志</a></li>
			<li class="menus2"><a href="<?php echo BLOG_URL; ?>admin/">管理中心</a></li>
			<li class="menus2"><a href="<?php echo BLOG_URL; ?>admin/?action=logout">退出</a></li>
			<?php else: ?>
			<li class="menus2"><a href="<?php echo BLOG_URL; ?>admin/">登录</a></li>
			<?php endif; ?>                    
		</div>          
		<div class="clear"></div>
	</div>
	<!--header end-->